package other.database;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author bingo
 * @Description
 * @Date 2018/7/31
 */
public class Main {
    public static void main(String[] args) {

        ExecutorService pool = Executors.newCachedThreadPool();
          for(int i=0;i<10;i++){
            pool.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println(Thread.currentThread().getName());
                    UserDao userDao = new UserDao();
                    userDao.insert();
                }
            });
        }
    }
}
